<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"	
	template="/resources/scaffold/pageTemplate.xhtml">

	<f:metadata>
		<f:viewParam name="id" value="#{sdSaleOrderItemBean.id}"/>
		<f:event type="preRenderView" listener="#{sdSaleOrderItemBean.retrieve}"/>
	</f:metadata>

	<ui:param name="pageTitle" value="Create Sd Sale Order Detail"/>

	<ui:define name="header">
		Sd Sale Order Detail
	</ui:define>

	<ui:define name="subheader">
		<c:choose>
			<c:when test="#{!empty sdSaleOrderItemBean.id}">
				Edit existing Sd Sale Order Detail
			</c:when>
			<c:otherwise>
				Create a new Sd Sale Order Detail
			</c:otherwise>
		</c:choose>
	</ui:define>

	<ui:define name="footer"/>

	<ui:define name="main">
		<h:form id="create">
			<h:messages globalOnly="true" styleClass="error"/>

			<h:panelGrid columnClasses="label,component,required" columns="3">
				<h:outputLabel for="sdSaleOrderItemBeanSdSaleOrderItemSdSaleOrder" value="Sd Sale Order:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{sdSaleOrderBean.converter}" id="sdSaleOrderItemBeanSdSaleOrderItemSdSaleOrder" value="#{sdSaleOrderItemBean.sdSaleOrderItem.sdSaleOrder}">
						<f:selectItem/>
						<f:selectItems value="#{sdSaleOrderBean.all}"/>
					</h:selectOneMenu>
					<h:message for="sdSaleOrderItemBeanSdSaleOrderItemSdSaleOrder" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdSaleOrderItemBeanSdSaleOrderItemSoItemNo" value="So Item No:"/>
				<h:panelGroup>
					<h:inputText id="sdSaleOrderItemBeanSdSaleOrderItemSoItemNo" required="true" value="#{sdSaleOrderItemBean.sdSaleOrderItem.soItemNo}"/>
					<h:message for="sdSaleOrderItemBeanSdSaleOrderItemSoItemNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="sdSaleOrderItemBeanSdSaleOrderItemSoItemDescr" value="So Item Descr:"/>
				<h:panelGroup>
					<h:inputText id="sdSaleOrderItemBeanSdSaleOrderItemSoItemDescr" maxLength="100" required="true" value="#{sdSaleOrderItemBean.sdSaleOrderItem.soItemDescr}"/>
					<h:message for="sdSaleOrderItemBeanSdSaleOrderItemSoItemDescr" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="sdSaleOrderItemBeanSdSaleOrderItemSoQty" value="So Qty:"/>
				<h:panelGroup>
					<h:inputText id="sdSaleOrderItemBeanSdSaleOrderItemSoQty" required="true" value="#{sdSaleOrderItemBean.sdSaleOrderItem.soQty}"/>
					<h:message for="sdSaleOrderItemBeanSdSaleOrderItemSoQty" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="sdSaleOrderItemBeanSdSaleOrderItemSoPpu" value="So Ppu:"/>
				<h:panelGroup>
					<h:inputText id="sdSaleOrderItemBeanSdSaleOrderItemSoPpu" required="true" value="#{sdSaleOrderItemBean.sdSaleOrderItem.soPpu}"/>
					<h:message for="sdSaleOrderItemBeanSdSaleOrderItemSoPpu" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="sdSaleOrderItemBeanSdSaleOrderItemSoTotalPriceExcVat" value="So Price Exc Vat:"/>
				<h:panelGroup>
					<h:inputText id="sdSaleOrderItemBeanSdSaleOrderItemSoTotalPriceExcVat" required="true" value="#{sdSaleOrderItemBean.sdSaleOrderItem.soTotalPriceExcVat}"/>
					<h:message for="sdSaleOrderItemBeanSdSaleOrderItemSoTotalPriceExcVat" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="sdSaleOrderItemBeanSdSaleOrderItemSoStatusIncVat" value="So Status Inc Vat:"/>
				<h:panelGroup>
					<h:inputText id="sdSaleOrderItemBeanSdSaleOrderItemSoStatusIncVat" required="true" value="#{sdSaleOrderItemBean.sdSaleOrderItem.soStatusIncVat}"/>
					<h:message for="sdSaleOrderItemBeanSdSaleOrderItemSoStatusIncVat" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="sdSaleOrderItemBeanSdSaleOrderItemSoVatPercVal" value="So Vat Perc Val:"/>
				<h:panelGroup>
					<h:inputText id="sdSaleOrderItemBeanSdSaleOrderItemSoVatPercVal" required="true" value="#{sdSaleOrderItemBean.sdSaleOrderItem.soVatPercVal}"/>
					<h:message for="sdSaleOrderItemBeanSdSaleOrderItemSoVatPercVal" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="sdSaleOrderItemBeanSdSaleOrderItemSoVat" value="So Vat:"/>
				<h:panelGroup>
					<h:inputText id="sdSaleOrderItemBeanSdSaleOrderItemSoVat" required="true" value="#{sdSaleOrderItemBean.sdSaleOrderItem.soVat}"/>
					<h:message for="sdSaleOrderItemBeanSdSaleOrderItemSoVat" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="sdSaleOrderItemBeanSdSaleOrderItemSoTotalPrice" value="So Price:"/>
				<h:panelGroup>
					<h:inputText id="sdSaleOrderItemBeanSdSaleOrderItemSoTotalPrice" required="true" value="#{sdSaleOrderItemBean.sdSaleOrderItem.soTotalPrice}"/>
					<h:message for="sdSaleOrderItemBeanSdSaleOrderItemSoTotalPrice" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
			</h:panelGrid>

			<div class="buttons">
				<h:commandLink value="Save" action="#{sdSaleOrderItemBean.update}" styleClass="btn btn-primary"/>
				<c:choose>
					<c:when test="#{!empty sdSaleOrderItemBean.id}">
						<h:link value="Cancel" outcome="view" styleClass="btn btn-primary">
							<f:param name="id" value="#{sdSaleOrderItemBean.id}"/>
						</h:link>
						<h:commandLink value="Delete" action="#{sdSaleOrderItemBean.delete}" styleClass="btn btn-primary"/>
					</c:when>
					<c:otherwise>
						<h:link value="Cancel" outcome="search" styleClass="btn btn-primary"/>
					</c:otherwise>
				</c:choose>
			</div>
		</h:form>
	</ui:define>

</ui:composition>